package com.bw.ppjokeplay.Bind

import androidx.databinding.BindingAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter

/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/10 0010 下午 6:38
 *
 */
class FindRecommendBind {
    companion object{
        @JvmStatic
        @BindingAdapter(value = ["recommendAdapter"])
        fun binAdapter(
            recyclerView: RecyclerView,
            feedAdapter: BaseQuickAdapter<*, *>
        ){
            val linearLayoutManager = LinearLayoutManager(recyclerView.context)
            linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
            recyclerView.layoutManager = linearLayoutManager
            recyclerView.adapter = feedAdapter
        }
    }
}